Skip to content

SRE-3706: Add yamllint and copyright checks#7

Merged
JohnMalmberg merged 9 commits into
mainfrom
sre-3706-copyright
May 27, 2026
Merged

SRE-3706: Add yamllint and copyright checks#7
JohnMalmberg merged 9 commits into
mainfrom
sre-3706-copyright

Conversation

@JohnMalmberg

Copy link
Copy Markdown
Contributor
  • Add a yamllint script for *.yml, *.yaml, .yamllint, and .ansible-lint files.
  • Add a copyright script with --fix support to insert the standard Hewlett Packard Enterprise Development LP header in candidate files.
  • Add commit message formatting guidance and update linter documentation.

Changed files/directories

  • bin/run-linters.sh, checks/detect-linters.sh, checks/linter-common.sh: add yaml and copyright candidate selection and dispatch wiring.
  • checks/install-linter-tools.sh: add yamllint package installation mapping.
  • checks/linters/yamllint/: add yamllint lint scripts (run.sh and run.ps1).
  • checks/linters/copyright/: add copyright check scripts (run.sh and run.ps1) with --fix support.
  • docs/linters.md, docs/usage.md, docs/git-commit-message-guidelines.md: update linter docs and add commit message guidance.
  • vscode-project-words.txt: add yamllint to project word list.

@JohnMalmberg JohnMalmberg requested a review from a team as a code owner April 24, 2026 21:05
@JohnMalmberg JohnMalmberg force-pushed the sre-3706-copyright branch 4 times, most recently from 7b97964 to d40fc49 Compare April 24, 2026 23:01
@JohnMalmberg

Copy link
Copy Markdown
Contributor Author

- Add changed-file detection and runner wiring for Python files.
- Run flake8 and pylint as a unified meta-linter on discovered *.py
  files and files without an extension that declare a Python shebang.

Changed files/directories
- bin/run-linters.sh, checks/detect-linters.sh, checks/linter-common.sh:
	add linter_is_python_candidate() with shebang detection for files
	without an extension, python_needed flag, and dispatch wiring.
- checks/install-linter-tools.sh:
	add flake8 and pylint to package list with dnf/yum name mapping.
- checks/linters/python/:
	add Python meta-linter scripts (run.sh and run.ps1) running both
	flake8 and pylint on the same file set.
- docs/linters.md:
	update linter list with python description and tool requirements.
- vscode-project-words.txt:
	add flake8, pylint to project word list.

Signed-off-by: John E. Malmberg <john.malmberg@hpe.com>
- Add a yamllint script for `*.yml`, `*.yaml`, `.yamllint`, and
  `.ansible-lint` files.
- Add a copyright script with `--fix` support to insert the standard
  `Hewlett Packard Enterprise Development LP` header in candidate files.
- Add commit message formatting guidance and update linter documentation.

Changed files/directories
- bin/run-linters.sh, checks/detect-linters.sh, checks/linter-common.sh:
	add yaml and copyright candidate selection and dispatch wiring.
- checks/install-linter-tools.sh:
	add yamllint package installation mapping.
- checks/linters/yamllint/:
	add yamllint lint scripts (run.sh and run.ps1).
- checks/linters/copyright/:
	add copyright check scripts (run.sh and run.ps1) with `--fix`
	support.
- docs/linters.md, docs/usage.md, docs/git-commit-message-guidelines.md:
	update linter docs and add commit message guidance.
- vscode-project-words.txt:
	add yamllint to project word list.

Signed-off-by: John E. Malmberg <john.malmberg@hpe.com>
Comment thread .yamllint Outdated
Comment thread .yamllint Outdated
Comment thread .yamllint Outdated
Comment thread docs/linters.md Outdated
Comment thread docs/git-commit-message-guidelines.md Outdated
Comment thread bin/setup-dev.sh Outdated
Comment thread bin/setup-github-workflow.sh Outdated
Comment thread checks/linters/copyright/run.sh Outdated
Comment thread checks/linters/copyright/run.sh
Comment thread checks/linters/copyright/run.sh Outdated
Signed-off-by: John E. Malmberg <john.malmberg@hpe.com>

@JohnMalmberg JohnMalmberg left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pushed an update.

Comment thread bin/setup-dev.sh Outdated
Comment thread bin/setup-github-workflow.sh Outdated
Comment thread checks/linters/copyright/run.sh Outdated
Comment thread checks/linters/copyright/run.sh
Comment thread checks/linters/copyright/run.sh Outdated
Comment thread docs/git-commit-message-guidelines.md Outdated
Comment thread docs/linters.md Outdated
Comment thread .yamllint Outdated
Comment thread .yamllint Outdated
Comment thread .yamllint Outdated
Signed-off-by: John E. Malmberg <john.malmberg@hpe.com>
setup-dev.sh was generating log noise testing for npm-groovy-lint needs.

Signed-off-by: John E. Malmberg <john.malmberg@hpe.com>
Comment thread .yamllint Outdated
Comment thread docs/linters.md Outdated
Comment thread bin/setup-dev.sh Outdated
Comment thread bin/setup-dev.sh
Comment thread bin/setup-dev.sh Outdated
Comment thread checks/workflow_d/basic-source-checks.template.yml Outdated
Comment thread checks/linter-common.sh
Comment thread checks/linter-common.sh Outdated
Comment thread checks/linter-common.sh Outdated
Comment thread checks/verify-executable-modes.sh Outdated

@JohnMalmberg JohnMalmberg left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will try to push an update tomorrow to address most of these issues and some other issues found in some more tests being done.

Comment thread bin/setup-dev.sh
Comment thread checks/workflow_d/basic-source-checks.template.yml Outdated
Comment thread checks/linter-common.sh
Comment thread docs/linters.md Outdated
Also includes bugfixes found in testing as a submodule.

- .github/dependabot.yml:
  Enable dependabot scanning of this repository.
- checks/guard-jenkins-library-pin.sh:
  Block landing of Jenkinsfiles that pin a library version.

Signed-off-by: John E. Malmberg <john.malmberg@hpe.com>
Signed-off-by: John E. Malmberg <john.malmberg@hpe.com>
@JohnMalmberg JohnMalmberg requested a review from janekmi May 7, 2026 17:09
Comment thread bin/run-linters.sh Outdated
Comment thread checks/linters/python/run.sh Outdated
Comment thread checks/workflow_d/basic-source-checks.template.yml
Comment thread checks/guard-jenkins-library-pin.sh Outdated
Comment thread .github/workflows/bootstrap-checks.yml Outdated
Base automatically changed from sre-3706-python to main May 19, 2026 16:01
@JohnMalmberg JohnMalmberg requested a review from janekmi May 19, 2026 19:01
@JohnMalmberg JohnMalmberg merged commit 1810a57 into main May 27, 2026
5 checks passed
@JohnMalmberg JohnMalmberg deleted the sre-3706-copyright branch May 27, 2026 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants